<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #div1{
            background-color: blue;
            color: orange;
            width: 100px;
            height: 200px;
          
        }
        .div2{
            background-color: blue;
            color: orange;
            
        }
        .a{
            width: 100px;
            height: 200px;
            font-size: large;
        }
        #div1:link{
            color: gray;
        }
        #div1:visited{
            color: green;
        }
        #div1:hover{
            color: peru;
        }
        #div1:active{
            color: red;
        }

        .a:link{
            color: gray;
        }
        .a:visited{
            color: green;
        }
       .a:hover{
            color: peru;
        }
        .a:active{
            color: red;
        }
    </style>
</head>
<body>
    <div id="div1">ID选择器--蓝色背景，橙色字体</div>
    <br>
    <div class="div2 a">类名选择器--蓝色背景，橙色字体</div>
</body>
</html>